package com.guxingke.nioserver.event;

import com.guxingke.nioserver.exception.ServerException;
import com.guxingke.nioserver.core.HttpRequest;
import com.guxingke.nioserver.core.HttpResponse;

public interface ServerListener {

    void onError(ServerException serverException);

    void onAccept() throws Exception;

    void onAccepted(HttpRequest request) throws Exception;

    void onRead(HttpRequest request) throws Exception;

    void onWrite(HttpRequest request, HttpResponse response)
            throws Exception;

    void onClosed(HttpRequest request) throws Exception;
}
